package com.example.koizzi.ad20180606_note;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MyOpenHelper extends SQLiteOpenHelper {
    Context context;
    public MyOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
        this.context = context;
    }

    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        String createTableStudent = "create table student(id int,name varchar(20),age int)";
        sqLiteDatabase.execSQL(createTableStudent);
//        String createTableScore = "create table score(id int,math int,android int)";
//        sqLiteDatabase.execSQL(createTableScore);
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }
}
